// const readline = require('readline').createInterface({
//   input: process.stdin,
//   output: process.stdout
// })

// readline.question("你是谁?\n", name => {
//   console.log('你好,', name);
//   readline.close()
// })

const inquirer = require('inquirer')

let questions = [
  {
    type: 'input',
    name: 'name',
    message: '账号：'
  },
  {
    type: 'password',
    name: 'password',
    message: '密码：'
  },
]

inquirer.prompt(questions).then(answers => {
  console.log(answers);
  console.log("你好，", answers.name);
})